<?php 
//所有的代码必须重新打！！！！
include '../functions.php';
//为了下面的foreach循环不报错
$info = array();
if(IS_POST){

	include './Upload.class.php';
	$upload = new Upload();
	$info = $upload->up();
	//如果上传失败
	if(!$info){
		echo "<span style='color:red'>" . $upload->error . "</span>";
	}
	
}


 ?>
 <!doctype html>
 <html lang="en">
 <head>
 	<meta charset="UTF-8" />
 	<title>Document</title>
 </head>
 <body>
 	<!--显示当前上传的图片-->
 	<ul>
 		<?php foreach($info as $v): ?>
 			<li><img src="<?php echo $v ?>" alt="" style="width: 200px;"/></li>
 		<?php endforeach ?>
 	</ul>
 	<hr />
 	<form action="" method="post" enctype="multipart/form-data">
 		<input type="file" name="up[]" id="" />
 		<input type="file" name="up[]" id="" />
 		<input type="file" name="pp"  />
 		<input type="submit" value="上传"/>
 	</form>
 </body>
 </html>